﻿using MyData.Models;
using MyWeb.App_Start;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MyWeb.Controllers
{
    public class SystemConfigController : BaseController
    {
        // GET: SystemConfig
        [HandlerLogin]
        public ActionResult Index()
        {
            var dto = SystemConfigApp.GetSystemConfigDto();
            return View(dto);
        }
        [HttpPost]
        public JsonResult SaveSystemConfig(SystemConfig systemConfig)
        {
            return base.Try(() =>
            {
                SystemConfigApp.SaveSystemConfig(systemConfig);
            });
        }
    }
}